package mvc.model

import org.json.JSONObject

class TempValue(val min: Int, val max: Int, val timeOut: Int) {
    companion object {
        fun withJson(json: JSONObject): TempValue {
            val max = json.getInt("temTop")
            val min = json.getInt("temBottom")
            val timeOut = json.getInt("duration")
            return TempValue(min, max, timeOut)
        }
    }
}